home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / patch / ps3ba1.lha / 3.0bupdate / Macros.LHA / TechReport.rexx < prev   
OS/2 REXX Batch file  |  1994-10-12  |  10KB  |  316 lines

  1. /* $VER: TechReport.rexx 1.0a (13.10.94)
  2.    Copyright 1994 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. /* SAME OLD STUFF */
  6. OPTIONS RESULTS
  7. TRACE OFF
  8. ADDRESS COMMAND
  9. /* Make sure rexx support is opened */
  10. IF ~SHOW('L','rexxsupport.library') THEN
  11.    CALL ADDLIB('rexxsupport.library',0,-30)
  12.  
  13. /* DEFINITIONS AND REPORT SETUP */
  14. ofilename='ram:Report.TEXT'
  15. tfilename='t:Report.TEMP'
  16.  
  17. if ~open(.ofile, ofilename, 'W') then return 9
  18. call writeln(.ofile, 'PAGESTREAM 3.0 TECHNICAL SUPPORT REPORT')
  19. call writeln(.ofile, '---------------------------------------')
  20.  
  21.  
  22. /* MAIN LOOP */
  23. call REGINFO()
  24. call SYSTEMINFO()
  25. call HELPSYSTEM()
  26. call ASSIGNS()
  27. call PROGRAMS()
  28. call LIBS()
  29. call FILTERS()
  30. call EFFECTS()
  31. call ENGINES()
  32. call COLORS()
  33. call CLEANUP()
  34.  
  35.  
  36. REGINFO:
  37. call writeln(.ofile, '')
  38. call writeln(.ofile, 'USER INFORMATION:')
  39. if ~open(.tfile, 'PageStream3:PageStream3.prefs', 'R') then rcode=9
  40.     else rcode=0
  41. user.name='Unknown'
  42. user.comp='Unknown'
  43. user.regn='Unknown'
  44. if rcode=0 then do
  45.     do until eof(.tfile)
  46.         temp=(readln(.tfile))
  47.         if left(temp,8)='USERNAME' then user.name=left(right(temp,length(temp)-10),length(temp)-11)
  48.         if left(temp,8)='USERCOMP' then user.comp=left(right(temp,length(temp)-13),length(temp)-14)
  49.         if left(temp,8)='USERREGN' then parse var temp dum user.regn .
  50.     end
  51.     call close(.tfile)
  52. end
  53. call writeln(.ofile, '  User Name................. '||user.name)
  54. call writeln(.ofile, '  Company................... '||user.comp)
  55. call writeln(.ofile, '  Registration Number....... '||user.regn)
  56. return rcode
  57.  
  58. SYSTEMINFO:
  59. call writeln(.ofile, '')
  60. call writeln(.ofile, 'SYSTEM INFORMATION:')
  61. 'version >'||tfilename
  62. temp=GETTEMP()
  63. call writeln(.ofile, '  '||temp)
  64. 'cpu >'||tfilename
  65. temp=GETTEMP()
  66. call writeln(.ofile, '  '||temp)
  67. call writeln(.ofile, '')
  68. 'avail >'||tfilename
  69. if ~open(.tfile, tfilename, 'R') then return 9
  70. do 4
  71.     temp=readln(.tfile)
  72.     call writeln(.ofile, '  '||temp)
  73. end
  74. call close(.tfile)
  75. return
  76.  
  77. HELPSYSTEM:
  78. call writeln(.ofile, '')
  79. call writeln(.ofile, 'HELP SYSTEM:')
  80. if exists('libs:amigaguide.library') then do
  81.     'version libs:amigaguide.library >'||tfilename
  82.     temp=GETTEMP()
  83.     parse var temp dum ver .
  84.     call writeln(.ofile, '  AmigaGuide.library........ v'||ver)
  85. end
  86. else call writeln(.ofile, '  AmigaGuide.library........ MISSING!')
  87. if exists('sys:Utilities/AmigaGuide') then do
  88.     'version sys:utilities/amigaguide >'||tfilename
  89.     temp=GETTEMP()
  90.     parse var temp dum ver .
  91.     call writeln(.ofile, '  AmigaGuide program........ v'||ver)
  92.     agflag=1
  93. end
  94. else agflag=0
  95. if exists('sys:Utilities/Multiview') then do
  96.     'version sys:utilities/multiview >'||tfilename
  97.     temp=GETTEMP()
  98.     parse var temp dum ver .
  99.     call writeln(.ofile, '  MultiView program......... v'||ver)
  100.     mvflag=1
  101. end
  102. else mvflag=0
  103. if agflag=0 & mvflag=0 then call writeln(.ofile, '  AmigaGuide/Multiview...... MISSING!')
  104. return
  105.  
  106. ASSIGNS:
  107. call writeln(.ofile, '')
  108. call writeln(.ofile, 'ASSIGNS: (AmigaDOS assigns)')
  109.  
  110. /* find out if the softlogik: assign was made */
  111. slassign=showlist('a','SOFTLOGIK')
  112. if slassign=1 then do
  113.     'assign SoftLogik: exists >'||tfilename
  114.     if ~open(.tfile, tfilename, 'R') then return 9
  115.     temp=(readln(.tfile))
  116.     if pos('SOFTLOGIK',upper(temp))~=0 then do
  117.         parse var temp dum line
  118.         line=strip(line,'b')
  119.         call writeln(.ofile, '  SoftLogik................. '||line)
  120.     end
  121.     call close(.tfile)
  122. end
  123. else call writeln(.ofile, '  SoftLogik................. SoftLogik: ASSIGN NOT MADE!')
  124.  
  125. /* find out if the pagestream3: assign was made */
  126. pgsassign=showlist('a','PAGESTREAM3')
  127. if pgsassign=1 then do
  128.     'assign PageStream3: exists >'||tfilename
  129.     if ~open(.tfile, tfilename, 'R') then return 9
  130.     temp=(readln(.tfile))
  131.     if pos('PAGESTREAM3',upper(temp))~=0 then do
  132.         parse var temp dum line
  133.         line=strip(line,'b')
  134.         call writeln(.ofile, '  PageStream3............... '||line)
  135.     end
  136.     call close(.tfile)
  137. end
  138. else call writeln(.ofile, '  PageStream3............... PageStream3: ASSIGN NOT MADE!')
  139.  
  140. /* find out if the fonts assign addition was made */
  141. 'assign fonts: exists >'||tfilename
  142. if ~open(.tfile, tfilename, 'R') then return 9
  143. line=nul
  144. do until eof(.tfile)
  145.     temp=(readln(.tfile))
  146.     if pos('SOFTLOGIK',upper(temp))~=0 & pos('FONTS',upper(temp))~=0 then line=right(temp,length(temp)-pos('+',temp)-1)
  147. end
  148. if line=nul then call writeln(.ofile, '  Fonts..................... SoftLogik:Fonts add ASSIGN NOT MADE!')
  149. call close(.tfile)
  150. call writeln(.ofile, '  Fonts..................... '||line||' add')
  151. return
  152.  
  153. PROGRAMS:
  154. call writeln(.ofile, '')
  155. call writeln(.ofile, 'PROGRAM FILES:')
  156. if exists('PageStream3:PageStream3') then do
  157.     'version PageStream3:PageStream3 >'||tfilename
  158.     temp=GETTEMP()
  159.     parse var temp dum ver ver2 .
  160.     /* for technical reasons, PageStream has version numbers of PageStream3 1.0 instead of PageStream 3.0. Let's make it easier on the user by changing this for the report. */
  161.     ver='3'||right(ver,length(ver)-1)
  162.     if ver2='' then ver2=' '
  163.     call writeln(.ofile, '  PageStream3 program....... v'||ver||' 'ver2)
  164. end
  165. else call writeln(.ofile, '  PageStream3 program....... MISSING!')
  166. if exists('PageStream3:BME') then do
  167.     'version PageStream3:BME >'||tfilename
  168.     temp=GETTEMP()
  169.     parse var temp dum ver ver2 .
  170.     if ver2='' then ver2=' '
  171.     call writeln(.ofile, '  BME program............... v'||ver||' 'ver2)
  172. end
  173. else call writeln(.ofile, '  BME program............... MISSING!')
  174. if exists('PageStream3:PageLiner') then do
  175.     'version PageStream3:PageLiner >'||tfilename
  176.     temp=GETTEMP()
  177.     parse var temp dum ver ver2 .
  178.     if ver2='' then ver2=' '
  179.     call writeln(.ofile, '  PageLiner program......... v'||ver||' 'ver2)
  180. end
  181. else call writeln(.ofile, '  PageLiner program......... MISSING!')
  182. return
  183.  
  184. LIBS:
  185. call writeln(.ofile, '')
  186. call writeln(.ofile, 'SOFTLOGIK:LIBS (program libraries)')
  187. if exists('SoftLogik:Libs/softlogik_app.library') then 'version SoftLogik:Libs/softlogik_app.library >'||tfilename
  188. temp=GETTEMP()
  189. parse var temp dum ver .
  190. call writeln(.ofile, '  softlogik_app.library..... v'||ver)
  191. if exists('SoftLogik:Libs/softlogik_obj.library') then 'version SoftLogik:Libs/softlogik_obj.library >'||tfilename
  192. temp=GETTEMP()
  193. parse var temp dum ver .
  194. call writeln(.ofile, '  softlogik_obj.library..... v'||ver)
  195. if exists('SoftLogik:Libs/slarexxsupport.library') then 'version SoftLogik:Libs/slarexxsupport.library >'||tfilename
  196. temp=GETTEMP()
  197. parse var temp dum ver .
  198. call writeln(.ofile, '  slarexxsupport.library.... v'||ver)
  199. return
  200.  
  201. FILTERS:
  202. call writeln(.ofile, '')
  203. call writeln(.ofile, 'SOFTLOGIK:FILTERS (filter modules)')
  204. if exists('SoftLogik:filters') then do
  205.     call GETFILES('softlogik:filters')
  206.     call SAYVERS('softlogik:filters')
  207.     end
  208. else do
  209.     call writeln(.ofile, '- Filters directory MISSING!')
  210. end
  211. return
  212.  
  213. EFFECTS:
  214. call writeln(.ofile, '')
  215. call writeln(.ofile, 'SOFTLOGIK:EFFECTS (effect modules)')
  216. if exists('SoftLogik:effects') then do
  217.     call GETFILES('softlogik:effects')
  218.     call SAYVERS('softlogik:effects')
  219.     end
  220. else do
  221.     call writeln(.ofile, '- Effects directory MISSING!')
  222. end
  223.  
  224. /* PRINTERS */
  225. call writeln(.ofile, '')
  226. call writeln(.ofile, 'SOFTLOGIK:PRINTERS (printer drivers)')
  227. if exists('SoftLogik:printers') then do
  228.     call GETFILES('softlogik:printers')
  229.     call SAYVERS('softlogik:printers')
  230.     end
  231. else do
  232.     call writeln(.ofile, '- Printers directory MISSING!')
  233. end
  234. return
  235.  
  236. ENGINES:
  237. call writeln(.ofile, '')
  238. call writeln(.ofile, 'SOFTLOGIK:ENGINES (font and text code modules)')
  239. if exists('SoftLogik:engines') then do
  240.     call GETFILES('softlogik:engines')
  241.     call SAYVERS('softlogik:engines')
  242.     end
  243. else do
  244.     call writeln(.ofile, '- Engines directory MISSING!')
  245. end
  246. return
  247.  
  248. COLORS:
  249. call writeln(.ofile, '')
  250. call writeln(.ofile, 'SOFTLOGIK:COLORS (color libraries)')
  251. if exists('SoftLogik:colors') then do
  252.     call GETFILES('softlogik:colors')
  253.     call SAYVERS('softlogik:colors')
  254.     end
  255. else do
  256.     call writeln(.ofile, '- Colors directory MISSING!')
  257. end
  258. return
  259.  
  260.  
  261. GETTEMP:
  262.     if ~open(.tfile, tfilename, 'R') then return 9
  263.     temp=readln(.tfile)
  264.     call close(.tfile)
  265. return temp
  266.  
  267. GETFILES:
  268.     parse arg path
  269.     Files=showdir(path,file,'|')
  270.     fLength=length(Files)
  271.     nList=0
  272.     DO WHILE fLength>0
  273.         cLength=pos('|',Files)
  274.         IF cLength=0 then DO
  275.             cLength=FLength+1
  276.             fLength=0
  277.         END
  278.         cFile=left(Files,cLength-1)
  279.         eFile=right(cFile,cLength-lastpos('.',cFile))
  280.         IF eFile~='.info' THEN DO
  281.             nList=nList+1
  282.             List.nList=cFile
  283.         END
  284.         IF FLength~=0 THEN Files=right(Files,fLength-cLength)
  285.         fLength=fLength-cLength
  286.     END
  287. return
  288.  
  289. SAYVERS:
  290.     parse arg path
  291.     do count=1 to nlist
  292.         if right(list.count,5)~='.info' then do
  293.             if upper(right(list.count,8))='FONTLIST' | upper(list.count)='POSTSCRIPT.EHANDLER' | upper(right(list.count,6))='HEADER' | upper(right(list.count,10))='DICTIONARY' | upper(left(list.count,7))='PANTONE' then do
  294.                 'list "'||path||'/'list.count||'" lformat %l >'||tfilename
  295.                 ver=' '||GETTEMP()||' bytes'
  296.             end
  297.             else do
  298.                 'version '||path||'/'||list.count||' >'||tfilename
  299.                 temp=GETTEMP()
  300.                 parse var temp dum ver ver2 .
  301.                 if ver2='' then ver2=' '
  302.                 ver=' v'||ver||' '||ver2
  303.             end
  304.             call writeln(.ofile,substr('  '||list.count,1,28,'.')||ver)
  305.         end
  306.     end
  307. return
  308.  
  309. CLEANUP:
  310. call close(.ofile)
  311. 'multiview '||ofilename
  312. if rc>0 then 'amigaguide '||ofilename
  313.  
  314. 'delete '||tfilename||' >NIL:'
  315. exit
  316.